Optimizing your System Folder files to achieve greater speed during startups and re-starts.......
Theory of operation:
Every hard disk, no matter how small or large, has the necessary System folder. When the disk is first created, most users will run Apple's Installer utility to build one; but doing so isn't absolutely required. In either case, the files will be copied from the source disk to the hard disk in the order that either the Installer or the user dictates, and will then reside on the disk in that order. Generally, most of these files will end up somewhere on the HD in roughly contiguous sequence, with their specific location mapped to the HD's directory. The fact that they were copied in one specific block, however, doesn't mean that the Mac "looks" for them in that same order when it starts up - predetermined routines in the Mac's boot-up process dictate that. Over time, users will add INIT's and cdev's, each copied individually to its own location but still assigned to the System Folder as far as the disk directory is concerned. On top of this, many applications and DA's will create their own "prefs" files upon running and place them into the System Folder (probably because the software author knew that the only directory address (folder name) he could give them that was certain to be on every Startup disk is "System Folder"), further adding to the clutter.
If the HD in question is fairly large, over time INITs and cdevs will end up scattered all over, as they are installed or removed (and re-installed) by the user. Regardless of where they lie on-disk, the Mac will still search for and load them up in alphabetical order during startup. This requires the drive to work (read) first at one location, then another, and so on as it "hunts" out each file.
Since most users eventually accumulate a fairly large number of INITs and cdevs, and because an increasing number of useful and necessary utilities are being created in this format, inevitably there is going to be a slowdown in the startup process - a very noticeable one. It may get to the point where the hard drive must scan to a new location on disk for almost every successive file the Mac needs to boot; no matter how quick the access time of the drive, things are going to slow down to a near-crawl.
The solution is to arrange *all* the files the Mac needs to boot (including INITs and cdevs *not currently in use*) in contiguous order on the HD; therefore the drive won't have to "seek" to locate them. As any given startup file is located and read by the disk drive heads, the next will fall naturally into line. If a file isn't needed (a "disabled" INIT, for example), the HD will need only to proceed "past" those disk blocks to the next. Further, any attempts at defragmentation and optimization that act upon the remainder of the HD should not affect or reorganize the System Folder files. The only way to guarantee this is to make the System Folder a separate disk volume unto itself, i.e., by way of "encasing" it within its own partition on disk... or, more precisely, "partitioning off" the remainder of the disk....
Steps to Take:
Analyze what's in your System Folder -
This is the easy part. From the Finder, open the System Folder and choose "Print Directory" from the file menu. I would suggest that before you print, you choose to view the files "By Name" rather than by Icon or any other means. This will ensure the printout lists all INITs and cdev's in the correct, alphabetical order that the Mac "sees" them and loads them during startup.
Make notes on the printout as to which files are INITs, cdevs, pref files, and the like. The finder doesn't really show them as INITs "by name", but rather lists them as "Startup documents"; similarly, cdev's are shown as "Control Panel documents". Most, but not all "pref" files are preceded by the name of the application or DA that created them. Printing resource files are shown as "Chooser documents".
At this point you can give some preliminary thought as to which of these files the Mac really needs to access at startup time. Most pref files are accessed only when an application is launched or is closed, so they will get lowest (really, no) priority in startup. Also, since printing resources are seldom changed and only accessed after startup is completed, they can be very low on the totem-pole. I marked all pref files, "Last", and all Chooser docs "next to last".
Some applications require (or strongly suggest) that you nest folders containing their auxiliary files within the System Folder - MacWrite II, for example, suggests that you create a "Claris" folder within the System folder in which to store its dictionary, thesaurus, etc. Since these have absolutely nothing to do with startup, they can go in "after the Last", so to speak.
I also recommend the use of either MasterJuggler or Suitcase (both excellent resource-management utilities) to keep as many fonts, DA's, fKeys, sounds and the like out of the System Folder and the System file itself as clean as possible.
Analyze the Startup process (INITs, etc.) -
Although I'm still unsure of the precise order of file loading during startup, I've come to some conclusions about which files seem to load first during startup....
First and foremost, the Mac when turned on will check to see which is the "Startup Device" in order to determine which files to load.
Next, the Mac seems to look for a file named "Startup Screen" to display; if none is found, it displays the "Welcome to Macintosh" screen.
Simultaneously, the System file itself is read into memory.
INITs and cdevs are read in alphabetical order and "patched" into the System where appropriate.
Finally, the Finder loads and displays the Desktop. Boot-up is completed...
There is much more going on behind the scenes here, but my principal concern is which disk files the Mac will access and in what order.
I prepared a small WP document to retain as reference during this (and future) System rebuilds; during the rebuilding, I checked off each successive file after copying it to the new System Folder. Essentially, this is the order of copying that I settled on:
Startup Device cdev
Startup screen(s) - if there are more than one, you can copy them in contiguous succession (only the one named "Startup Screen" will be loaded at startup, but the others will still reside in their "proper" place on disk - all you need to do is change their names).
System File
INITs and cdevs - these should be listed individually, in the precise alphabetical order as specified earlier in the "View by Name" printout from the Finder. Relying on the visual display of INITs and cdevs at Startup time is not in itself a wholly reliable method of determining their loading order, since some have no icons to display, and other icons are only displayed by voluntary option.
NOTE: There are some cdevs that do not seem to be accessed by the Mac except at times *other* than Startup. One that comes to mind is the "SCSI Probe" cdev. If you wish, you might copy these "non bootup" cdevs to disk in abc order directly behind the "bootup" files....
Printing resources
Pref files
Other files and folders that normally reside in the System Folder
Backup your System Folder -
This would be a good time to decide if there are some INITs and cdevs that you seldom or never use and toss them out. Also, if you have prefs files laying around from apps or DAs you no longer use, you can get rid of them as well....
Although you could use a standard HD backup program to backup your System Folder for this operation, do so ONLY if the program will allow you to restore the files individually, one at a time and in the order you choose. Actually, you can do just as well by making a Finder copy of the System Folder to one (or more) disks, or to a Stuffit archive - either can be stored safely for future access at any time, without need to run the backup program. My personal feeling is that keeping these files in "Finder" or "Stuffit" formats will make them much easier to work with, both now and in the event you do another System Folder housecleaning job in the future.
Backup ALL your other data -
In this case, a standard HD backup utility will do fine. Make sure, however, that this b/u DOES NOT include the System Folder, or that during the restore you can specify that it be skipped.
Reformat your drive -
I used Apple's HDSC Setup to format, verify, and test the drive before beginning to rebuild it.
Reinstall the System Folder -
With the drive completely cleaned off, you can now begin the process of building the System Folder file by file in the order you want the files to load during startup, using the file you prepared earlier for reference. The most important consideration here is that the files be copied one by one, in the exact order that you want them to "lie" on the HD; just selecting several at once and issuing a "copy" command may not guarantee this. Do it by hand, one at a time - you'll be glad you did!
Partition off the remainder of your disk -
I had never tried this before, and it was a learning experience (not without some frustration as well). I tried at first to use Apple's HDSC setup program to do the partitioning, but found the interface clumsy and lacking as to how to create partitions of specific sizes. I finally settled on S.U.M. Partition (itself a combined INIT/DA) - it works smoothly and is easy to learn as well.
I worked with a 40mb HD for this experiment, but I see no reason why it wouldn't work with drives of less capacity (30 or even 20mb).....
With the newly-rebuilt System Folder in place, you can restart your drive and take a look at the remaining space to determine how much can be partitioned off without sacrificing the need for further growth of the System Folder as time goes by. In my case, before rebuilding my System Folder sized out at about 3.5mb, so I partitioned off all but 6mb of disk space, leaving room for future expansion.
WARNING - I found that I could not boot up my HD using S.U.M. Partition unless the newly-rebuilt System Folder resided *outside* of any partitions you create with S.U.M. This would seem only natural since to run S.U.M. needs to load the @SUM Partition INIT into the System - but it took several mistakes before I stumbled onto that conclusion... 8-)
For this reason, my System Folder (along with a few other folders and files) lives on the "main", un-partitioned area of my disk.
DataDesk keyboard users - the "MasterStrokes" "Macro Folder" must reside there as well.
Restore your other data -
All remaining applications, data documents, etc., can be restored to the one or more partitions you've created. You can now backup, defragment and optimize the partitioned areas as necessary without affecting the files of your System Folder.
Furthermore, at some point in the future if you want to re-optimize your System files, you can do so by simply erasing them and re-copying them to the same area of the HD, without affecting you apps and data files.
A few conclusions:
1. System Folder Optimization will achieve genuine results for any user of a hard drive who's willing to take the time to do it. It will benefit not only fast HD's running at a 1:1 interleave, but also medium and slower HD's at both 2:1 and 3:1; in fact, I believe that the slower the access speed of the drive (and the Mac accessing it), the *greater* the speed increase will be.
2. There should be some solution to the endless proliferation of "prefs" files that various applications and DAs place into the System folder. While I know they have to put them *somewhere*, perhaps software developers could agree on some future standard for some kind of "storage" folder someplace other than the System folder in which to locate them....... perhaps System 7.0 will deal with this, or if not, why can't Apple issue some guidelines? How about a "hook" built into programs which will place all prefs files into a folder entitled "Pref Files Folder", creating such a folder to contain them if one isn't found?
3. Although several disk optimization programs currently on the market offer the option to "prioritize" files on a disk, I think they ought to consider including some kind of special option to prioritize the System folder in particular. This would be a welcome feature. The current crop of Optimizers only seem able to group applications and other frequently-accessed files together, gather "free" space into a contiguous block, and group data files.
4. Startup screens, no matter how nice they are, inevitably slow down the boot process. Since a pokey Mac can wear out it's welcome during a bootup or restart, I've learned to be content with that old "Welcome to Macintosh" greeting.
5. The "recommended" way of disabling INITs and cdevs by dragging them out of your System folder and re-starting (either when removing them temporarily or trying to resolve possible software conflicts) is one of the *worst* things you can do, as far as the organization of your System Folder is concerned. This breeds fragmentation. The solution is to use some sort of INIT/cdev manager, either shareware, commercial, or freeware, that can turn them on or off without moving them. The most elegant, stable, and solid of these I've yet found is named "Answer", by Steve Bryan, and it's free.